import request from '@/utils/request'

// 查询种植主体信息列表
export function listPlanter(query) {
  return request({
    url: '/plant/planter/list',
    method: 'get',
    params: query
  })
}

// 查询种植主体信息详细
export function getPlanter(planterId) {
  return request({
    url: '/plant/planter/' + planterId,
    method: 'get'
  })
}

// 新增种植主体信息
export function addPlanter(data) {
  return request({
    url: '/plant/planter',
    method: 'post',
    data: data
  })
}

// 修改种植主体信息
export function updatePlanter(data) {
  return request({
    url: '/plant/planter',
    method: 'put',
    data: data
  })
}

// 删除种植主体信息
export function delPlanter(planterId) {
  return request({
    url: '/plant/planter/' + planterId,
    method: 'delete'
  })
}
